<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/transfer/memberRefundApply.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>运营商</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>余额提现</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var FinanceManage_refund_update = false;
    var FinanceManage_refund_look = false;
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">

                    <input id="transferType" name="transferType" type="hidden" value="${transferType}">
                    <input id="isVerification" name="isVerification" type="hidden" value="${isVerification}">

                    <input id="nickname" name="nickname" type="text" class="form-control shortInput"
                           placeholder="会员名">
                    <input id="mobile" name="mobile" type="text" class="form-control shortInput input-distance"
                           placeholder="手机号">
                    <input id="memberMobile" name="memberMobile" type="text"
                           class="form-control shortInput input-distance"
                           placeholder="提现账户号码">
                    <input id="memberRealName" name="memberRealName" type="text"
                           class="form-control shortInput input-distance"
                           placeholder="对应真实姓名">
                    <input id="outTradeNo" name="outTradeNo" type="text" class="form-control input-distance longInput"
                           placeholder="提现订单号">
                    <shiro:hasPermission name="FinanceManage_refund_add">
                        <button class="btn btn-success input-distance marginLeft-auto"
                                onclick="memberRefundApply.addMemberRefundApply()">
                            新增
                        </button>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="FinanceManage_refund_add">
                        <button class="btn btn-success input-distance"
                                onclick="memberRefundApply.pdselect()">
                            批量处理
                        </button>
                    </shiro:hasPermission>
                </div>

                <div class="row">

                    <select id="refundSource" name="refundSource" class="form-control shortInput ">
                        <option value="">发起来源</option>
                        <option value="0">公众号</option>
                        <option value="1">APP</option>
                        <%--<option value="2">小程序</option>--%>
                        <option value="3">运营商后台</option>
                    </select>
                    <select id="refundBy" name="refundBy" class="form-control input-distance shortInput input-distance">
                        <option value="">提现途径</option>
                        <option value="0">微信</option>
                        <option value="1">支付宝</option>
                        <option value="2">银行卡</option>
                    </select>
                    <select class="form-control shortInput input-distance" name="status" id="status">
                        <option value="">提现状态</option>
                        <option value="">全部</option>
                        <option value="0">未审核</option>
                        <option value="2">已驳回</option>
                        <option value="3">提现中</option>
                        <option value="4">已到账</option>
                        <option value="5">提现失败</option>
                    </select>
                    <input id="startTime" name="startTime" type="text" autocomplete="off"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="开始时间">
                    <input id="endTime" name="endTime" type="text" autocomplete="off"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="结束时间">
                    <shiro:hasPermission name="FinanceManage_refund_reload">
                        <button class="btn btn-success input-distance" onclick="memberRefundApply.reLoad()">查询</button>
                    </shiro:hasPermission>

                    <shiro:hasPermission name="FinanceManage_refund_export">
                        <div class="pull-left search fr exportNumInput">
                            <input id="count" name="count" type="text" class="form-control" autocomplete="off"
                                   placeholder="导出条数">
                        </div>
                        <div class="pull-left search fr">
                            <button class="btn btn-success exportBtn"
                                    onclick="memberRefundApply.exportMemberRefundApply()">
                                导出
                            </button>
                        </div>
                    </shiro:hasPermission>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>


                <%--  驳回理由  --%>
                <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
                     aria-labelledby="exampleModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                        aria-hidden="true"></span></button>
                                <h4 class="modal-title" id="exampleModalLabel" data-dismiss="modal" aria-label="Close">
                                    关闭</h4>
                            </div>
                            <div class="modal-body">
                                <form id="contentForm" class="layui-form">
                                    <div class="form-group row">
                                        <label class="col-sm-4 col-form-label text-right">请输入驳回理由:</label>
                                        <div class="col-sm-8">
                                            <textarea class="form-control" id="remark" name="remark"
                                                      style="height: 80%"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-success" id="submitForm">确认</button>
                            </div>
                        </div>
                    </div>
                </div>


                <%--  通过是验证码  --%>
                <div class="modal fade" id="exampleModalVerification" tabindex="-1" role="dialog"
                     aria-labelledby="exampleModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                        aria-hidden="true"></span></button>
                                <h4 class="modal-title" id="exampleModalLabelVerification" data-dismiss="modal"
                                    aria-label="Close">
                                    关闭</h4>
                            </div>
                            <div class="modal-body">
                                <form id="contentFormVerification" class="layui-form">
                                    <div class="form-group row">
                                        <label class="col-sm-4 col-form-label text-right">运营商手机号:</label>
                                        <div class="col-sm-6">
                                            ${mobile}
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-sm-4 col-form-label text-right">验证码:</label>
                                        <input class="col-sm-4  col-form-label" id="authCode"
                                               name="authCode">
                                        <div class="col-sm-4">
                                            <a class="btn btn-success" id="getMemberRefundAuthCode"
                                               onclick="memberRefundApply.getMemberRefundAuthCode()">
                                                获取验证码
                                            </a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-success" id="submitVerificationForm">处理</button>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>
</div>

<shiro:hasPermission name="FinanceManage_refund_update">
    <script>
        FinanceManage_refund_update = true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="FinanceManage_refund_look">
    <script>
        FinanceManage_refund_look = true;
    </script>
</shiro:hasPermission>
<script type="text/javascript">

    $('#exampleModalVerification').on('hidden.bs.modal', function () {
        document.getElementById("contentFormVerification").reset();
    });

    // var ibi = Math.floor(15.7784514000 * 100) / 100;
    //
    // console.log(ibi);
    //日期范围限制
    var start = {
        elem: '#startTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            $("#endTime").val("")
            end.min = datas
        }
    };
    var end = {
        elem: '#endTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    laydate.skin('molv');//皮肤
    memberRefundApply.init();
</script>
</body>
</html>